package Factory.store;

import Factory.factory.SimplePizzaFactory;
import Factory.interfaces.Pizza;

/**
 * @Author: pengzx
 * @Description:
 * @Date: 10:45 2017/9/7
 * @Modified by: 1.0
 */
public abstract class PizzaStore {
    public Pizza orderPizza(String type){
        Pizza pizza = null;
        pizza = createPizza(type);//= SimplePizzaFactory.createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    //其他方法
    public abstract Pizza createPizza(String type);//这个方法用于子类拓展
}
